package com.kaifamiao.www.demo.Do18;

public class Ex004 {
    public static void main(String[] args) {
        //输出100以内的数字，1,2,3.....100
        for (int i = 1;i <= 100;i++){
            //素数的约数等于它本身加一
            int iSum = 0;
            for (int j = 1;j <= i;j++){
               if(i % j == 0){
                   iSum += j;
               }
            }
       if(iSum == i+1){
           System.out.println(i);
       }
    }

    }
}
